Skip to content

fix: preserve cached table list shape#10179

Open
memleakd wants to merge 2 commits intocodeigniter4:developfrom
memleakd:refactor/list-tables-cached-list-shape
Open

fix: preserve cached table list shape#10179
memleakd wants to merge 2 commits intocodeigniter4:developfrom
memleakd:refactor/list-tables-cached-list-shape

Conversation

@memleakd
Copy link
Copy Markdown
Contributor

@memleakd memleakd commented May 9, 2026

Description

Preserves the documented list<string> return shape of BaseConnection::listTables() when returning cached table names.

When a table is dropped, the cached table-name array may become sparse. Returning array_values() from the cached path keeps the result as a proper list, matching the method PHPDoc and the fresh-query path.

This was split out from #10169 after review because it is a small database metadata fix with its own regression coverage.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Copy link
Copy Markdown
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need a changelog entry for this one.

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label May 10, 2026
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
@memleakd
Copy link
Copy Markdown
Contributor Author

We still need a changelog entry for this one.

Added in 9a4613b. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants